import React, { FC } from 'react';

import { TemplateWorkExperience } from '../../../models/template-detail.types';
import { CommonHeadLine } from './CommonHeadLine';
import { InfoListWithSideTitle } from './InfoListWithSideTitle';

const COM_PREKEY = 'CommonWorkExperience';

interface CommonWorkExperienceProps extends TemplateWorkExperience {}

const CommonWorkExperience: FC<CommonWorkExperienceProps> = (props) => {
    return (
        <>
            <CommonHeadLine
                lineTexts={[props.companyName, props.position]}
                from={props.from}
                to={props.to}
            />
            <div className="work-content">
                <InfoListWithSideTitle title="内容" contents={props.experiences} />
                <InfoListWithSideTitle title="成就" contents={props.achievements} />
            </div>
        </>
    );
};

CommonWorkExperience.displayName = 'CommonWorkExperience';

export { CommonWorkExperience, CommonWorkExperienceProps };
